package com.project.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.StorageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("storage")
public class StorageController {
    @Autowired
    private com.project.service.IStorageService storageService;

@RequestMapping("cutByItem")
    public IPage<StorageBean> cutByItem (Integer pageNO, String name, Integer minNum, Integer maxNum , String price, String type){
    return storageService.cutByItem(pageNO, name, minNum, maxNum, price, type);
};

@RequestMapping("findById")
public StorageBean findById(Integer id){
    return  storageService.findById(id);
};

@RequestMapping("update")
public String  update(Integer id,Integer price){
    storageService.update(id,price);
    return"ok";
};

}
